package com.recipedb.recipedb.entity;

import jakarta.persistence.*;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Entity
@Table(name = "favorite")
@IdClass(FavoriteId.class)
public class Favorite {

    @Id
    private Long userId;

    @Id
    private Long recipeId;

    private LocalDateTime createdAt;

    @Transient
    private Recipe recipe;
}